principles of exception handling in c